package file.day9_18.day03.homework;

import file.day9_18.day03.Person;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;

public class Test02Read {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        FileInputStream fis = new FileInputStream("张三.obj");
        ObjectInputStream ois = new ObjectInputStream(fis);


        User user =  (User) ois.readObject();//获取加强转
        System.out.println(user.toString());
        ois.close();
    }
}
